package com.bzkj.basicinfo.mapper.stock;

import com.bzkj.basicinfo.domain.stock.WmsStockEntity;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * @Author：swj
 * @Desc
 * @Date：2025/10/29 11:41
 */
public interface WmsStockMapper {
    WmsStockEntity selectStock(@Param("productId") String productId, @Param("batchCode")String batchCode,
                               @Param("locationCode")String locationCode );

    int updateStock(WmsStockEntity entity);

    int insertStock(WmsStockEntity entity);

    /**
     * 根据商品ID查询可用库存总量
     * @param productId 商品ID
     * @return 可用库存数量
     */
    BigDecimal selectAvailableStockByProductId(@Param("productId") String productId);
}
